package fr.vvins.core.order.entity;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import fr.vvins.core.dao.EntityImpl;

/**
 * PaymentItem entity
 */
@Entity
@Table(schema="vvins", name="VV_PAYMENT_ITEM")
public class PaymentItem extends EntityImpl implements Serializable {

	private static final long serialVersionUID = 6040308257403192150L;
	@Id
	@GeneratedValue
	@Column(name="id")
	private int id;
	@ManyToOne
	@JoinColumn(name="ORDER_ID")
	private Order order;
	@ManyToOne
	@JoinColumn(name="PAYMENT_METHOD_ID")
	private PaymentMethod paymentMethod;
	@Basic
	@Column(name="STATUS")
	private Integer status;
	@Basic
	@Column(name="AMOUNT")
	private String amount;
	@Basic
	@Column(name="DATA")
	private String data;

	public PaymentItem() {
	}

	public PaymentItem(Integer id, Order order, PaymentMethod paymentMethod,
			Integer status, String amount, String data) {
		super();
		this.id = id;
		this.order = order;
		this.paymentMethod = paymentMethod;
		this.status = status;
		this.amount = amount;
		this.data = data;
	}

	@Override
	public Integer getId() {
		return id;
	}

	@Override
	public void setId(Integer id) {
		this.id = id;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public PaymentMethod getPaymentMethod() {
		return paymentMethod;
	}

	public void setPaymentMethod(PaymentMethod paymentMethod) {
		this.paymentMethod = paymentMethod;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}



}
